package org.ylg.actions;

import com.opensymphony.xwork2.ActionSupport;

public class Login extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String username;
	private String password;
	
	//@RequiredStringValidator (message="username can't be blank",fieldName = "username")
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	//@RequiredStringValidator (message="password can't be blank",fieldName = "password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String login() {
		if(username.equals(password)){
			return SUCCESS;
		}else{
			return ERROR;
		}
	}
}
